{include file="public/header2" /}
<form action="{:url('/admin/blog/blogcat_edit/cid/'.$category['category_id'])}" method="post" enctype="multipart/form-data">
    <input type="hidden" name="category_id" value="{$category.category_id}" />
<div class="layui-form layuimini-form">
    <div class="layui-form-item">
        <label class="layui-form-label required">分类标题</label>
        <div class="layui-input-block">
            <input type="text"  name="category_name"  lay-verify="required" lay-reqtext="博客标题不能为空" placeholder="请输入博客分类标题" value="{$category.category_name}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">分类图片</label>
        <div class="layui-input-block">
            <input type="file"  name="path"  lay-verify="required" lay-reqtext="博客标题不能为空" placeholder="请输入博客分类标题" value="" class="layui-input">
            <img src="/uploads/{$category.path}" alt="">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal"  id="editBtn" type="submit">确认编辑</button>
        </div>
    </div>
</div>
</form>
<script src="/static/admin/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script>
    layui.use(['util', 'laydate', 'layer'], function(){
        var util = layui.util
            ,laydate = layui.laydate
            ,$ = layui.$
            ,layer = layui.layer;
        //XSS 过滤
        $('#editBtn').on('click', function(){ //监听按钮事件
            var str = util.escape($('.layui-input').val()); //执行 xss 过滤方法
            $('.layui-input').val(str);
        });
    });
</script>
<!--<script>-->
<!--    layui.use(['form'], function () {-->
<!--        var form = layui.form,-->
<!--            layer = layui.layer,-->
<!--            $ = layui.$;-->

<!--        //监听提交-->
<!--        form.on('submit(saveBtn)', function (data) {-->
<!--            var index = layer.alert(JSON.stringify(data.field), {-->
<!--                title: '最终的提交信息'-->
<!--            }, function () {-->

<!--                // 关闭弹出层-->
<!--                layer.close(index);-->

<!--                var iframeIndex = parent.layer.getFrameIndex(window.name);-->
<!--                parent.layer.close(iframeIndex);-->

<!--            });-->

<!--            return false;-->
<!--        });-->

<!--    });-->
<!--</script>-->
</body>
</html>